package com.service;

import com.mapper.CommentMapper;
import com.po.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 阳幸子 on 2018/5/14.
 */
@Service
public class CommentService {
    @Autowired
    private CommentMapper commentMapper;

    public int countById (long course_id){
        return commentMapper.countById(course_id);
    }

    public List<com.vo.Comment> selectByCourseId(long id){
        return commentMapper.selectByCourseId(id);
    }
    public void insertComment(Comment comment){
        commentMapper.insertComment(comment);
    }
}
